import request from '@/utils/request'

// 查询销售人员列表
export function listSalesUser(query) {
  return request({
    url: '/vanger/salesUser/list',
    method: 'get',
    params: query
  })
}

// 查询销售人员列表（联合）
export function listUnion(query) {
  return request({
    url: '/vanger/salesUser/listUnion',
    method: 'get',
    params: query
  })
}


// 查询销售人员详细（联合）
export function getInfoUnion(id) {
  return request({
    url: '/vanger/salesUser/getInfoUnion/' + id,
    method: 'get'
  })
}

// 查询销售人员详细
export function getSalesUser(id) {
  return request({
    url: '/vanger/salesUser/' + id,
    method: 'get'
  })
}

// 新增销售人员
export function addSalesUser(data) {
  return request({
    url: '/vanger/salesUser',
    method: 'post',
    data: data
  })
}

// 修改销售人员
export function updateSalesUser(data) {
  return request({
    url: '/vanger/salesUser',
    method: 'put',
    data: data
  })
}

// 删除销售人员
export function delSalesUser(id) {
  return request({
    url: '/vanger/salesUser/' + id,
    method: 'delete'
  })
}
